<html>
  <body>
    <button onclick="onClick()">Click me</button>
    <div id="log"></div>
    <script>
      function onClick() {
        document.getElementById('log').textContent = 'clicked'
      }
    </script>
  </body>
</html>